//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.itheima.pinda.authority.base.entity.SuperEntity.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

@ApiModel(
        value = "UserUpdateDTO",
        description = "用户"
)
public class UserUpdatePasswordDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @NotNull(
            message = "id不能为空",
            groups = {Update.class}
    )
    private Long id;
    @ApiModelProperty("旧密码")
    @NotEmpty(
            message = "旧密码不能为空"
    )
    @Length(
            max = 64,
            message = "旧密码长度不能超过64"
    )
    private String oldPassword;
    @ApiModelProperty("密码")
    @NotEmpty(
            message = "密码不能为空"
    )
    @Length(
            max = 64,
            message = "密码长度不能超过64"
    )
    private String password;
    @ApiModelProperty("确认密码")
    @NotEmpty(
            message = "确认密码不能为空"
    )
    @Length(
            max = 64,
            message = "确认密码长度不能超过64"
    )
    private String confirmPassword;

    public static UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder builder() {
        return new UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public String getOldPassword() {
        return this.oldPassword;
    }

    public String getPassword() {
        return this.password;
    }

    public String getConfirmPassword() {
        return this.confirmPassword;
    }

    public UserUpdatePasswordDTO setId(final Long id) {
        this.id = id;
        return this;
    }

    public UserUpdatePasswordDTO setOldPassword(final String oldPassword) {
        this.oldPassword = oldPassword;
        return this;
    }

    public UserUpdatePasswordDTO setPassword(final String password) {
        this.password = password;
        return this;
    }

    public UserUpdatePasswordDTO setConfirmPassword(final String confirmPassword) {
        this.confirmPassword = confirmPassword;
        return this;
    }

    public UserUpdatePasswordDTO() {
    }

    public UserUpdatePasswordDTO(final Long id, final String oldPassword, final String password, final String confirmPassword) {
        this.id = id;
        this.oldPassword = oldPassword;
        this.password = password;
        this.confirmPassword = confirmPassword;
    }

    public String toString() {
        return "UserUpdatePasswordDTO(super=" + super.toString() + ", id=" + this.getId() + ", oldPassword=" + this.getOldPassword() + ", password=" + this.getPassword() + ", confirmPassword=" + this.getConfirmPassword() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserUpdatePasswordDTO)) {
            return false;
        } else {
            UserUpdatePasswordDTO other = (UserUpdatePasswordDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label59;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label59;
                    }

                    return false;
                }

                Object this$oldPassword = this.getOldPassword();
                Object other$oldPassword = other.getOldPassword();
                if (this$oldPassword == null) {
                    if (other$oldPassword != null) {
                        return false;
                    }
                } else if (!this$oldPassword.equals(other$oldPassword)) {
                    return false;
                }

                Object this$password = this.getPassword();
                Object other$password = other.getPassword();
                if (this$password == null) {
                    if (other$password != null) {
                        return false;
                    }
                } else if (!this$password.equals(other$password)) {
                    return false;
                }

                Object this$confirmPassword = this.getConfirmPassword();
                Object other$confirmPassword = other.getConfirmPassword();
                if (this$confirmPassword == null) {
                    if (other$confirmPassword != null) {
                        return false;
                    }
                } else if (!this$confirmPassword.equals(other$confirmPassword)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserUpdatePasswordDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $oldPassword = this.getOldPassword();
        result = result * 59 + ($oldPassword == null ? 43 : $oldPassword.hashCode());
        Object $password = this.getPassword();
        result = result * 59 + ($password == null ? 43 : $password.hashCode());
        Object $confirmPassword = this.getConfirmPassword();
        result = result * 59 + ($confirmPassword == null ? 43 : $confirmPassword.hashCode());
        return result;
    }

    public static class UserUpdatePasswordDTOBuilder {
        private Long id;
        private String oldPassword;
        private String password;
        private String confirmPassword;

        UserUpdatePasswordDTOBuilder() {
        }

        public UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder oldPassword(final String oldPassword) {
            this.oldPassword = oldPassword;
            return this;
        }

        public UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder password(final String password) {
            this.password = password;
            return this;
        }

        public UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder confirmPassword(final String confirmPassword) {
            this.confirmPassword = confirmPassword;
            return this;
        }

        public UserUpdatePasswordDTO build() {
            return new UserUpdatePasswordDTO(this.id, this.oldPassword, this.password, this.confirmPassword);
        }

        public String toString() {
            return "UserUpdatePasswordDTO.UserUpdatePasswordDTOBuilder(id=" + this.id + ", oldPassword=" + this.oldPassword + ", password=" + this.password + ", confirmPassword=" + this.confirmPassword + ")";
        }
    }
}
